package com.gulimall.guilimallmember.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gulimall.common.utils.PageUtils;
import com.gulimall.guilimallmember.entity.MemberEntity;
import com.gulimall.guilimallmember.exception.PhoneExistException;
import com.gulimall.guilimallmember.exception.UserNameExistException;
import com.gulimall.guilimallmember.vo.MemberLoginVo;
import com.gulimall.guilimallmember.vo.MemberRegisterVo;
import com.gulimall.guilimallmember.vo.SocialUser;

import java.util.Map;

/**
 * 会员
 *
 * @author niujiaxing
 * @email sunlightcs@gmail.com
 * @date 2025-05-09 20:18:36
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);
    //用户注册功能
    void register(MemberRegisterVo registerVo);
    //检查是否唯一
    void checkPhoneUnique(String phone) throws PhoneExistException;

    void checkUseNameUnique(String userName) throws UserNameExistException;
    //用户登录功能
    MemberEntity login(MemberLoginVo vo);

    //社交登录
    MemberEntity socialLogin(SocialUser user) throws Exception;
}

